﻿using System;

class Program
{
    static void Main()
    {
        int[] numbers = { 3, 5, 7, 2, 8, 4, 10 };

        // 计算最大值、最小值、和
        int max = numbers[0];
        int min = numbers[0];
        int sum = 0;

        foreach (int num in numbers)
        {
            if (num > max)
                max = num;
            if (num < min)
                min = num;
            sum += num;
        }

        // 计算平均值
        double average = (double)sum / numbers.Length;

        // 输出结果
        Console.WriteLine("最大值: " + max);
        Console.WriteLine("最小值: " + min);
        Console.WriteLine("和: " + sum);
        Console.WriteLine("平均值: " + average);
    }
}